<?php
$mk=mktime(date("his"));

//$nuevo=null;
$nuevo=null;
$filtro=array("url"=>"Sigesp/filtrado_facturas_no_procesadas/vista/tabs_1","update"=>"tabs_123");
$pdf=null;
$exel=null;
$cal=null;
$this->Interfaz->botones($nuevo,$filtro,$pdf,$exel,$cal);


//echo $this->Interfaz->windowopen("Micasa/pdf/1",'/img/foto.png',900,600);


$i_edit = $this->Interfaz->img('iconos/icons/editar.png','Modificar','Modificar',15,15);
$i_bor = $this->Interfaz->img('iconos/icons/borrar.png',null,null,15,15);
$i_nuevo = $this->Interfaz->img('iconos/icons/nuevo.png',null,null,15,15);
$i_ver = $this->Interfaz->img('iconos/icons/nuevoregistro.png',null,null,15,15);
$i_pdf= $this->Interfaz->img('iconos/icons/pdf.png',null,null,15,15);
$i_pdf2= $this->Interfaz->img('iconos/icons/_printer.png',null,null,15,15);

//print_r($data[$i][$mode]);
if(count($data)>0)
{
		$this->Vista->paginador_inicio();
		$mode="Sigesp";
		for($i=0; $i<count($data); $i++)
		{ 
//				$id=$this->Interfaz->id($data[$i][$mode]['cod_arqueo']);
//				$iv='lista'.$i.$mk;
//				$ver=str_replace("'",'"',$this->Interfaz->ajax("Periodos/nuevo/vista/tabs_1/$busq/$id",'tabs_123'));
//				$ver="<a style=\'cursor:pointer;\' align=\'left\' id=\'ver$iv\' onclick=\'".$ver."\'>".$i_edit."</a>";


		/*		
				if($data[$i][$mode]['estatus']==1)$data[$i][$mode]['estatus']='estatus_1';
				else $data[$i][$mode]['estatus']='estatus_0';
		*/
	/*
[codemp] => 0001
            [numfac] => FAC-001000000000000001967
            [codcli] => 7674248
            [codusu] => aparedes                      
            [numcot] => COT-001000000000000002012
            [codciecaj] => 00000026
            [fecemi] => 2012-11-02 09:31:12
            [conpag] => 1
            [estfac] => P
            [estfaccon] => C
            [esppag] => F
            [monto] => 587.2
            [montoret] => 0
            [montopar] => 0
            [codtiend] => T001
            [cod_caja] => C01
            [numcon] => 001-000000000000000191591
            [tipfac] => N
            [obsfact] => 
            [numcarta] => -------------------------
            [numfacfle] => ------------------------
            [numpro] => 0000000000000000000000000
            [codpai] => VE 
            [codest] => LAR
            [codmun] => 149
            [codpar] => 0502
            [razcli] => JEANCARLOS  MENDOZA
            [dircli] => QUIBOR
            [telcli] => 
            [celcli] => 
            [productor] => NO
            [precio_estandar] => PV
            [cedcli] => V013881836
            [feccre] => 2012-11-02
            [codlistpre] => AGRI
            [codlapso] => Z001
            [limite_credito] => 0
            [staclisap] => 0
            [codclisap] => 
            [staclidel] => 0
	*/
			
			$data[$i]['nombre']=$tienda[$data[$i]['codtiend']];
			if(empty($data[$i]['nombre']))$data[$i]['nombre']='';
			if(empty($data[$i]['numfac']))$data[$i]['numfac']='';
			if(empty($data[$i]['cedcli']))$data[$i]['cedcli']='';
			if(empty($data[$i]['razcli']))$data[$i]['razcli']='';
			if(empty($data[$i]['fecemi']))$data[$i]['fecemi']='';


				$this->Vista->paginador_td($busq,
				array(

							array($data[$i]['codtiend'].' - '.$data[$i]['nombre']),
							array($this->Interfaz->fecha($data[$i]['feccre'])),
					        array($data[$i]['numfac']),
							array($data[$i]['cedcli'].' - '.$data[$i]['razcli']),
							//array($this->Interfaz->fecha($data[$i]['fecha_arqueo'])),/*
							array($data[$i]['codcli']),
							array($data[$i]['codlapso'])/*,
							array($data[$i]['deposito']),
							array($data[$i]['tdd']),
							array($data[$i]['tdc']),
							array($data[$i]['tdde']),
							array($data[$i]['total_cxc']),
							array($data[$i]['total_ret_bdv']),
							array($data[$i]['total_ret_islr_bdv']),
							array($data[$i]['total_ret_bav']),
							array($data[$i]['total_ret_islr_bav']),
							array($data[$i]['total_ret_bb']),
							array($data[$i]['total_ret_islr_bb']),
							array($data[$i]['total_comisiones_bancarias']),
							array($data[$i]['total_comisiones_tdc']),
							array($data[$i]['total_ret_islr'])//,*/
					//		array($i/*,$ver*/)
							)
				);
		} 
		
		$array=array(
								array('AGENCIA','140','l'),
								array('FECHA','70','r'),
								array('NUM.FACTURTA','170','r'),
								array('NOMBRE CLIENTE','auto','l'),
								array('COD.CLIENTE','80','c'),
								array('TIPO','80','r')/*,
								array('CHEQUE','60','r'),
								array('DEPOSITO','60','r'),
								array('TDD','60','r'),
								array('TDC','60','r'),
								array('TDE','60','r'),
								array('T.CXC','60','r'),
								array('T.R.RDV','60','r'),
								array('T.R.ISLR.RDV','90','r'),
								array('T.R.BAV','60','r'),
								array('T.R.BB','60','r'),
								array('T.R.ISLR.BB','90','r'),
								array('T.C.BAN','60','r'),
								array('T.C.TDC','60','r'),
								array('T.R.ISLR','80','r'),*/
						//		array('OPCIONES','30','c')
								);

		$this->Vista->paginador_fin(20,$array,1,1,'Tiendas');
}
else
{
		$this->Vista->mensaje('No se Encontraron Registros con "'.$busq.'"','Busqueda');
}
?>
